package com.seven.webhook.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.seven.webhook.model.MonitorEmail;
import com.seven.webhook.mapper.MonitorEmailMapper;
import com.seven.webhook.service.MonitorEmailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author seven
 * @since 2020-11-12
 */
@Service
public class MonitorEmailServiceImpl extends ServiceImpl<MonitorEmailMapper, MonitorEmail> implements MonitorEmailService {

    @Override
    public List<MonitorEmail> getByRuleId(String ruleId) {
        return list(new QueryWrapper<MonitorEmail>().lambda()
                .eq(MonitorEmail::getRuleId, ruleId));
    }
}
